<template>
  <div>
    <el-button @click="to(1)">1</el-button>
    <el-button @click="to(2)">2</el-button>
    <el-button @click="to(3)">3</el-button>
    <el-button @click="to(4)">4</el-button>
  </div>
</template>

<script>
export default {
  mounted() {
    console.log("触发");
  },
  methods: {
    to(id) {
      this.$router.push({ path: `/dongtai/${id}` });
    },
  },
};
</script>

<style></style>
